package io.github.betwowt.gateway;

import io.github.betwowt.gateway.route.NamespaceRouteDefinitionLocator;
import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.core.env.Environment;

/**
 * @author betwowt
 */
@SpringCloudApplication
public class GatewayApplication {

    public static void main(String[] args) {
        SpringApplication.run(GatewayApplication.class, args);
    }


    @Bean
    public NamespaceRouteDefinitionLocator namespaceRouteLocator(Environment env) {
        return new NamespaceRouteDefinitionLocator(env);
    }
}
